import request from '@/utils/request'

export function getMyPaperList(data) {
  return request({
    url: '/award/export',
    method: 'post',
    data
  })
}
export function getUserResults(data) {
  return request({
    url: '/award/UserGetRelateAward',
    method: 'post',
    data
  })
}

export function thesis_add(data) {
  return request({
    url: '/award/addAward',
    method: 'post',
    data
  })
}

export function thesis_add2(data) {
  return request({
    url: '/award/updateaward',
    method: 'post',
    data
  })
}
export function thesis_delete(ID) {
  return request({
    url: '/award/Deleteaward',
    method: 'get',
    params: { ID }
  })
}

export function thesis_commit(id) {
  return request({
    url: '/award/ReCommitaward',
    method: 'post',
    params: { id }
  })
}

// 撤回奖励
export function thesis_withdraw(id) {
  return request({
    url: '/award/WithdrawAward',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_author(id) {
  return request({
    url: '/awardauthor/selectauthor',
    method: 'get',
    params: { id }
  })
}

export function thesis_author_add(data) {
  return request({
    url: '/awardauthor/addauthor',
    method: 'post',
    data
  })
}

export function thesis_author_edit(params) {
  return request({
    url: '/awardauthor/updateauthor',
    method: 'get',
    params
  })
}

export function thesis_author_delete(id) {
  return request({
    url: '/awardauthor/deleteauthor',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_project(awardID) {
  return request({
    url: '/awardproject/GetAwardProjectByAwardID',
    method: 'get',
    params: { awardID }
  })
}

export function thesis_project_add(data) {
  return request({
    url: '/awardproject/AddawardProject',
    method: 'post',
    data
  })
}

export function thesis_project_edit(data) {
  return request({
    url: '/awardproject/UpdateAwardProject',
    method: 'post',
    data
  })
}

export function thesis_project_delete(id) {
  return request({
    url: '/awardproject/RemoveAwardProject',
    method: 'get',
    params: { id }
  })
}

// 院级审核
export function get_thesis_yuanji(data) {
  return request({
    url: '/award/CollegeUserGetAward',
    method: 'post',
    data
  })
}

export function thesis_pass_yuanji(PID) {
  return request({
    url: '/award/CollegeCheckPass',
    method: 'get',
    params: { PID }
  })
}

export function thesis_back_yuanji(data) {
  return request({
    url: '/award/CollegeCheckBack',
    method: 'post',
    data
  })
}

// 校级审核
export function get_thesis_xiaoji(data) {
  return request({
    url: '/award/SchoolUserGetAward',
    method: 'post',
    data
  })
}

export function thesis_pass_xiaoji(PID) {
  return request({
    url: '/award/SchoolCheckPass',
    method: 'get',
    params: { PID }
  })
}

export function thesis_back_xiaoji(data) {
  return request({
    url: '/award/SchoolCheckBack',
    method: 'post',
    data
  })
}

export function thesis_author_edit_xiaoji(data) {
  return request({
    url: '/awardauthor/upAwardAuthor',
    method: 'post',
    data
  })
}

export function update_thesis_source(data) {
  return request({
    url: '/awardqulification/upAwardScore',
    method: 'post',
    data
  })
}

// 附件
export function file_add(data) {
  return request({
    url: '/award/addawardfile',
    method: 'post',
    data
  })
}

export function get_file(id) {
  return request({
    url: '/award/pageawardfileCondition',
    method: 'get',
    params: { id }
  })
}

export function file_delete(id) {
  return request({
    url: '/award/Deleteawardfile',
    method: 'get',
    params: { id }
  })
}

// 量化
export function getCascadingData(params) {
  return request({
    url: '/awardtype/getCascadingData',
    method: 'get',
    params
  })
}

export function getQulification(AwardID) {
  return request({
    url: '/awardqulification/getAwardQulification',
    method: 'get',
    params: { AwardID }
  })
}

export function deleteQulification(AwardQualificationID) {
  return request({
    url: '/awardqulification/deleteAwardQulification',
    method: 'get',
    params: { AwardQualificationID }
  })
}

export function addQulification(data) {
  return request({
    url: '/awardqulification/addAwardQualification',
    method: 'post',
    data
  })
}

export function GetAwardDTObyID(awardid) {
  return request({
    url: 'award/GetAwardDTObyID',
    method: 'get',
    params: { awardid }
  })
}
